import request from "@/utils/request"

export default {
    //获取查询的分页数据
    selectHopitalPage(page, limit, serachObj) {
        return request({
            url: `/admin/hosp/hospitalSet/selectPage/${page}/${limit}`,
            method: 'get',
            params: serachObj  //gei用params
        })
    },
    //根据dictCode获取名字
    getProCityName(dictCode) {
        return request({
            url: `/admin/dict/getProCity/${dictCode}`,
            method: 'get'
        })
    },
    //根据父dictCode获取子一级市的数据
    getChildByDictType(province) {
        return request({
            url: `/admin/dict/getCityByDictType/${province}`,
            method: 'get'
        })
    },
    //更新医院上线状态
    updateStatus(id, status) {
        return request({
            url: `/admin/hosp/hospitalSet/update/${id}/${status}`,
            method: 'put'
        })
    },
    //显示医院详情
    showHospital(id) {
        return request({
            url: `/admin/hosp/hospitalSet/show/${id}`,
            method: 'get'
        })
    },
    //显示指定医院所有的科室
    getDepartmentByHosCode(hoscode) {
        return request({
            url: `/admin/hosp/department/getDepartment/${hoscode}`,
            method: 'get'
        })
    },
    //根据医院科室，查询排班的预约规则
    getScheduleRule(hoscode, depcode, page, limit) {
        return request({
            url: `/admin/hosp/schedule/getScheduleRule/${hoscode}/${depcode}/${page}/${limit}`,
            method: 'get'
        })
    },
    //根据医院科室以及日期，查询具体排班情况
    getScheduleDetail(hoscode, depcode, workDate) {
        return request({
            url: `/admin/hosp/schedule/getScheduleDetail/${hoscode}/${depcode}/${workDate}`,
            method: 'get'
        })
    },
}